<?php
require_once("{$CfgPara->root}/model/user.m.php");
if (isset($InputData["user_name"]) || isset($InputData["user_id"])) {
    if (isset($InputData["user_name"])) {
        $userC = 'Name';
        $user = $InputData["user_name"];
    } else if (isset($InputData["user_id"])) {
        $userC = 'Id';
        $user = $InputData["user_id"];
    }
    $myUser = new user_m($CfgPara->database);
    //获取用户信息
    $userMsg = $myUser->user_msg($userC, $user);
    if (!is_string($userMsg)) {
        if (isset($InputData["web_count"])) {
            require_once("{$CfgPara->root}/view/user_show_count.app.v.php");
        } else {
            if (!isset($_COOKIE["user_show_view"][$userMsg->Name])) {
                setcookie("user_show_view[{$userMsg->Name}]", '1'); //设置已浏览Cookie
                $result = $myUser->user_show_view_count($userMsg->Id);
                if (is_numeric($result) && $result > 0) $userMsg->ShowCount = $result;
            }
            require("{$viewRoot}user_show{$viewEx}");
        }
    } else {
        echo $userMsg;
    }
} elseif (isset($InputData['works_user_id'])) {
    //请求个人主页中的'更多'选项卡
    require("{$viewRoot}user_show_more{$viewEx}");
}
